package org.gikolet.ch2.android.dao;

import org.gikolet.guice.db.TransactionManager;

import roboguice.inject.ContextScoped;

import android.database.sqlite.SQLiteDatabase;

import com.google.inject.Inject;

@ContextScoped
public class AndroidTransactionManager implements TransactionManager {

	@Inject
	private SQLiteDatabase db;

	public void beginTransaction() {
		this.db.beginTransaction();
	}

	public void endTransaction() {
		this.db.endTransaction();
	}

	public boolean inTransaction() {
		return this.db.inTransaction();
	}

	public void setTransactionSuccessful() {
		this.db.setTransactionSuccessful();
	}
}
